<?php

class User_model extends CI_Model {


    function __construct()
    {
        // Call the Model constructor
        parent::__construct();
    }

    function login($username, $password)
    {

       $query = $this->db->get_where('admins', array('username' => $username,'password'=>$password));
            $result =  $query->result();
        if ($result)  return 1;
        else return 0;
    }
}
    ?>